<template>
  <div>
    <h1>App 组件 购物</h1>
    <hr>
    <Cart></Cart>
    <p class="allprice">总价格是:{{ allprice }}</p>
  </div>
</template>
<script>
import Cart from '@/components/Cart.vue'
export default {
  data() {
    return {}
  },
  computed: {
    allprice() {
      return this.$store.getters.allprice
    }
  },
  components: {
    Cart
  },
  methods: {}
}
</script>

<style lang="less" scoped>
.allprice {
  text-align: center;
  font-size: 18px;
  color: red;
}
</style>